package org.aeon.heroicsagatextedition.role.product;

import org.aeon.heroicsagatextedition.constants.CommonlyConstants;

/**
 * @projectName: HeroicSagaTextEdition
 * @package: org.aeon.heroicsagatextedition.role.product
 * @className: Monster
 * @author: MissingAeon
 * @date: 2023/12/22 13:02
 * @description: 怪物类，包含怪物的属性和方法。
 */
public abstract class Monster extends RoleUnit {

    private static final int MAX_HP = 200;    // 最大生命
    private static final int MAX_ATTACK = 80; // 最大攻击力

    public Monster(String name) {
        super(name, MAX_HP);
        maxAttack = MAX_ATTACK;
    }

    public int getCamp() {
        return CommonlyConstants.EVIL;
    }

    @Override
    public int getAttack() {
        return super.getAttack();
    }

    @Override
    public void hpChanged(int increment) {
        super.hpChanged(increment);
    }

    @Override
    public String toString() {
        return String.format("*************************" +
                "\n怪物名称：%s\n当前生命值：%d\t最大生命值：%d\n攻击力：%d-%d\n描述：%s\n" +
                "***********************\n\n", name, hp, maxHp, minAttack, maxAttack, describe);
    }
}
